<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>边框</title>
    <style>
        /* 
        [边框]必须设置一下三个值:
        border-width: 5px;
        border-color: red;
        border-style: dashed;
        */
        .outer {
            width: 100%;
            height: 200px;
            color: white;
            background-color: blue;
        }

        .inner {
            width: 100px;
            height: 200px;
            margin-left: 30px;
            color: white;
            background-color: red;
        }


        .outer1 {
            width: 100%;
            height: 200px;
            color: white;
            background-color: blue;
        }

        .inner1 {
            width: auto;
            height: 200px;
            color: white;
            background-color: red;
        }
    </style>
</head>

<body>
    <h2>1,width=100px</h2>
    margin-left: 30px;
    <hr>
    <div class="outer">
        <div class="inner"></div>
    </div>


    <h2>2,width: auto</h2>
    width默认就是auto,
    auto的值会自动被浏览器计算成最大值
    <hr>
    <div class="outer1">
        <div class="inner1"></div>
    </div>



</body>

</html>